<?php
//这个是能都把我IDY的加密文件解密
function jieMi($filename){
	$f_content = file_get_contents($filename);
	preg_match('/eval\(\'\$O0O000/', $f_content, $matches, PREG_OFFSET_CAPTURE);
	preg_match('/";eval/', $f_content, $matches2, PREG_OFFSET_CAPTURE);
	if($matches && $matches2){
		$len = strlen($f_content);
		$start = $matches[0][1];
		$length = $matches2[0][1] - $len;
		$str = substr($f_content, $start + 15, $length);
		$a = substr($str,52*2);
		$b = substr($str,52,52);
		$c = substr($str,0,52);
		$qq = base64_decode(strtr($a ,$b, $c));
		$fpp1 = fopen($filename, 'w');
		$back = fwrite($fpp1, $qq);
		if($back){
			echo "文件： ".$filename." 解密成功！ 解密写入 ".$back." 字节。<br>";
		}else{
			echo "解密文件 ".$filename." 时出现写入出错！<br>";
		}
	}else{
		echo "文件 ".$filename." 是明文代码。<br>";
	}
}
jieMi("a.php");
?>